Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filtering on fqdn/username for API calls #57

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

kot0dama
Copy link
Contributor

Overview

This change allows filtering on fqdn/username for all 3 API calls (domains, users, domain-user-permissions), through username and fqdn URL parameters.

Rationale

We need to be able to get details for specific entries through the API.

Checklist

  • The contributing guide was applied
  • The PR is tagged with appropriate label (urgent, trivial, complex)

This is neither urgent, trivial nor complex

Depends on #55 and #56

@kot0dama kot0dama marked this pull request as ready for review April 16, 2024 00:07
@kot0dama kot0dama requested a review from a team as a code owner April 16, 2024 00:07
@kot0dama
Copy link
Contributor Author

kot0dama commented Apr 16, 2024

force-pushed after rebase against current main branch now the prerequisites have merged!

arturo-seijas
arturo-seijas previously approved these changes Apr 16, 2024
@arturo-seijas
Copy link
Collaborator

/canonical/self-hosted-runners/run-workflows 2014fa8

@arturo-seijas
Copy link
Collaborator

@kot0dama , can you double check the CI output? One of the checks is failing

merkata
merkata previously approved these changes Apr 16, 2024
Copy link

@merkata merkata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, the fail-under needs to be changed to something reasonable, right now it fails as the test coverage is below a very optimistic 100%.

@merkata
Copy link

merkata commented Jul 10, 2024

@kot0dama can you have a look at the comment^?

@kot0dama
Copy link
Contributor Author

I've been assigned to other tasks since then, but I'll get to this as soon as I can!

@yanksyoon
Copy link

/canonical/self-hosted-runners/run-workflows c5a0ee3

yanksyoon
yanksyoon previously approved these changes Sep 13, 2024
@kot0dama
Copy link
Contributor Author

Added the missing unit test to bring to 100% coverage again.

@kot0dama
Copy link
Contributor Author

Added CVE-2024-34156 to .trivyignore per chat on the IS Devops channel.

@yanksyoon
Copy link

/canonical/self-hosted-runners/run-workflows 6c4a7b5

yanksyoon
yanksyoon previously approved these changes Sep 13, 2024
yhaliaw
yhaliaw previously approved these changes Sep 13, 2024
@kot0dama
Copy link
Contributor Author

Could I get a merge for this one please? cc @arturo-seijas maybe as you're familiar with it!
Thank you!

@mthaddon mthaddon dismissed stale reviews from yhaliaw and yanksyoon via fc47c53 September 13, 2024 07:00
@mthaddon
Copy link
Contributor

/canonical/self-hosted-runners/run-workflows fc47c53

Copy link

Test coverage for fc47c53

Name                                                              Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------------------------------------------------------
httprequest_lego_provider/__init__.py                                 0      0      0      0   100%
httprequest_lego_provider/apps.py                                     4      0      0      0   100%
httprequest_lego_provider/dns.py                                     68      0      8      0   100%
httprequest_lego_provider/forms.py                                   21      0      2      0   100%
httprequest_lego_provider/management/__init__.py                      0      0      0      0   100%
httprequest_lego_provider/management/commands/__init__.py             0      0      0      0   100%
httprequest_lego_provider/management/commands/allow_domains.py       21      0      2      0   100%
httprequest_lego_provider/management/commands/create_user.py         14      0      0      0   100%
httprequest_lego_provider/management/commands/list_domains.py        22      0      8      0   100%
httprequest_lego_provider/management/commands/revoke_domains.py      21      0      2      0   100%
httprequest_lego_provider/migrations/0001_initial.py                  8      0      0      0   100%
httprequest_lego_provider/migrations/__init__.py                      0      0      0      0   100%
httprequest_lego_provider/models.py                                   9      0      0      0   100%
httprequest_lego_provider/serializers.py                             24      0      0      0   100%
httprequest_lego_provider/urls.py                                     8      0      0      0   100%
httprequest_lego_provider/views.py                                   74      0     16      0   100%
-------------------------------------------------------------------------------------------------------------
TOTAL                                                               294      0     38      0   100%

Static code analysis report

Run started:2024-09-13 07:20:20.352191

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 1720
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@mthaddon mthaddon merged commit cf99281 into canonical:main Sep 13, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants